# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=openpuff
pkgver=4.01
pkgrel=3
groups=('blackarch' 'blackarch-stego' 'blackarch-windows')
pkgdesc='Yet not another steganography SW.'
arch=('x86_64')
url='https://embeddedsw.net/OpenPuff_Steganography_Home.html'
license=('custom:unknown')
depends=('wine' 'wine_gecko' 'wine-mono')
source=('https://embeddedsw.net/zip/OpenPuff_release.zip')
sha512sums=('cff5c5e819906e1e8e41d8083459c532ec7bbc7238fe98f56ad4fbb9eb5827a7c3dda8996d80e5ce6faf8b8bb216c071d4deb9bd8f9ca0d0519427644a58bffa')

package() {
  cd OpenPuff_release

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/windows/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" OpenPuff_Help_EN.pdf \
    OpenPuff_Help_IT.pdf
  install -Dm 644 license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  cp --no-preserve=ownership libObfuscate.dll OpenPuff.exe \
    "$pkgdir/usr/share/windows/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/windows/$pkgname
exec wine OpenPuff.exe
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

